package cn.cvs.dao;

import cn.cvs.pojo.Supplier;
import cn.cvs.pojo.SysUser;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface SupplierMapper {
    List<Supplier> queryAll2();
    @Select("select * from t_supplier")
    List<Supplier> findAll();
    @Select("select * from t_supplier where id=#{id}")
    Supplier queryById(int id);
    @Select("select count(*) from t_supplier")
    int count();
    List<Supplier> queryAll();
    int add(Supplier supplier);
    int upd(Supplier supplier);
    @Delete("delete from t_supplier where id=#{id}")
    int del(int id);

    //2021-10-26
    List<Supplier> queryDList(@Param("supCode") String supCode, @Param("supName") String supName);

    List<Supplier> queryDList2(@Param("supCode") String supCode, @Param("supName") String supName);

    List<Supplier> queryListById(@Param("ids") List<Integer> ids);
    List<Supplier> queryListById(@Param("ids") Set<Integer> ids);
    List<Supplier> queryListById(@Param("ids") Integer[] ids);
    List<Supplier> queryListById(@Param("ids") Map<String,Integer> ids);

    int update1(Supplier supplier);

    List<Supplier> queryDList3(@Param("supCode") String supCode, @Param("supName") String supName);

    List<Supplier> queryPage(@Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize);

    List<Supplier> queryByPage(@Param("supCode") String supCode, @Param("supName") String supName, @Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize);

    int queryCount(@Param("supCode") String supCode, @Param("supName") String supName);
}
